package be.kdg.netpresent;

import java.io.IOException;
import java.rmi.*;

import javax.swing.ImageIcon;

public interface PresentationInt extends Remote {
	
	// This method checks if the password entered by a client matches the
	// password stored on creation of this presentation.
	public boolean open(String sNewPWD) throws RemoteException;

	// Return the currently showed/dealt with...
	public int getCurrSlide() throws RemoteException;
	
	// Change/update the currently showed/dealt with. Used by the admin-client
	// to start a presentation on another slide than the default slide 1. (e.g.
	// if a presentation previously was not completed and picked up again later on.)
	public void setCurrSlide(int slideNumber) throws RemoteException;
	
	// Change/update the currently showed/dealt with. Used to change this variable
	// in the process of presenting/moving to the next slide.
	public boolean goToNextSlide() throws RemoteException;

	// This method returns the current, to be shown slide according 
	//  to the requested slide-number.
	public SlideInt getSlide(int iSlideReq) throws RemoteException;

	// This method is used upon creation of the presentation to generate
	// and add new slides to the presentation made.
	public void makeSlide(ImageIcon sImage, String sImgText)
			throws RemoteException, IOException;

	// Return the presentation ID...
	public int getID() throws RemoteException;
	
	// Return the number of slides present in this presentation...
	public int getNumberOfSlides() throws RemoteException;
	
	// Return the user defined and descriptive name of the presentation.
	public String getPresName() throws java.rmi.RemoteException;

	// Return the update time stamp, used in the synchronization process.
	public long getUpdate() throws RemoteException;

	// Method used to set the image content of the current slide. This
	// method calls the equally called method form the Slide class.
	public void setImg(ImageIcon image) throws java.rmi.RemoteException,
			IOException;

	// Method used to set the test content of the current slide. This
	// method calls the equally called method form the Slide class.
	public void setText(String sNewImgText) throws java.rmi.RemoteException,
			IOException;

	// Method used to set the question content of the current slide. This
	// method calls the equally called method form the Slide class.
	public void addQuestion(String sQuestion) throws java.rmi.RemoteException,
			IOException;

	// Method used to set the answer content of the current slide. This
	// method calls the equally called method form the Slide class.
	public void addAnswer(int iQueNr, String sAnswer)
			throws java.rmi.RemoteException, IOException;
}
